package com.lhn;

import com.lhn.config.SpringConfig;
import com.lhn.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author lhn
 * @date 2024-08-20 17:29
 */

public class App16 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        BookDao bookDao = (BookDao) ctx.getBean(BookDao.class);
        bookDao.save();
        bookDao.delete();
        bookDao.update();
        bookDao.select();
    }
}


/*
AOP...AOP...AOP...
执行消耗时间：0ms
book dao save ...
book dao delete ...
book dao update ...
book dao select ...
*/